package com.rzhkj.box.entity;

/**
 * Created by lixin on 2017/12/18.
 */
public enum NotificationStateEnum {
    Create("创建"),
    OnceMore("再次尝试"),
    Failed("通知失败"),
    Success("已完成"),;
    public String val;

    NotificationStateEnum(String val) {
        this.val = val;
    }

    /**
     * 任务状态
     *
     * @param stateName
     * @return
     */
    public static NotificationStateEnum getEnum(String stateName) {
        for (NotificationStateEnum boxStateEnum : NotificationStateEnum.values()) {
            if (boxStateEnum.name().equalsIgnoreCase(stateName)) {
                return boxStateEnum;
            }
        }
        return null;
    }

    @Override
    public String toString() {
        return this.name();
    }

}
